#coding=utf-8
import json
class MyClass1:
    def __init__(self):
        self.a=2
        self.b='bbb'
        self.c=1.5
class MyClass2:
    def __init__(self):
        self.aa=10
        self.bb='bbbbb'
        self.c='ccc'

# 创建字典
def createDict(interfaceName, methodName, params):
    dict1={'interfaceName':interfaceName,'methodName':methodName,'params':params}
    return dict1
# 创建参数集合
def createParams():
    myclass1 = MyClass1()
    myclass1Dict = myclass1.__dict__
    myclass2 = MyClass2()
    myclass2Dict = myclass2.__dict__
    dictParams1={'paramType':'MyClass1','paramJson':myclass1Dict}
    dictParams2 = {'paramType': 'MyClass2', 'paramJson': myclass2Dict}
    dictParams3={'paramType': 'Class333', 'paramJson': '3333333'}
    params=[dictParams1,dictParams2,dictParams3]
    return params


if __name__ == '__main__':

    interfaceName='com.yyl.base.oss.api.OssRecordRemoteService'
    methodName='hello2'
    params=createParams()
    myDict=createDict(interfaceName,methodName,params)
    myclassJson = json.dumps(myDict)
    print myclassJson